﻿@page


@model RazorPages.Pages.StuPage.CreateModel

<br />
<h1 class="text-info">添加</h1>
<br />
<div class="border container p-4">
    <form method="post">
        <div class="form-group row">

            <div class="col-3">
                @*占3份*@
                <label asp-for="stu.StudentName"></label>
            </div>
            <div class="col-6">
                @*占6份*@
                <input class="form-control" asp-for="stu.StudentName" />
            </div>
            <span asp-validation-for="stu.StudentName" class="text-danger"></span>
        </div>

        <div class="form-group row">
            <div class="col-3"><label asp-for="stu.Gender"></label></div>
            <div class="col-6"><input class="form-control" asp-for="stu.Gender" /></div>
            <span asp-validation-for="stu.Gender" class="text-danger"></span>
        </div>
        <div class="form-group row">
            <div class="col-3"><label asp-for="stu.Birthday"></label></div>
            <div class="col-6"><input class="form-control" asp-for="stu.Birthday" /></div>
            <span asp-validation-for="stu.Birthday" class="text-danger"></span>
        </div>
        <div class="form-group row">
            <div class="col-3"><label asp-for="stu.StudentIdNo"></label></div>
            <div class="col-6"><input class="form-control" asp-for="stu.StudentIdNo" /></div>
            <span asp-validation-for="stu.StudentIdNo" class="text-danger"></span>
        </div>
        <div class="form-group row">
            <div class="col-3"><label asp-for="stu.CardNo"></label></div>
            <div class="col-6"><input class="form-control" asp-for="stu.CardNo" /></div>
            <span asp-validation-for="stu.CardNo" class="text-danger"></span>
        </div>
        <div class="form-group row">
            <div class="col-3"><label asp-for="stu.StuImage"></label></div>
            <div class="col-6"><input class="form-control" asp-for="stu.StuImage" /></div>
            <span asp-validation-for="stu.StuImage" class="text-danger"></span>
        </div>
        <div class="form-group row">
            <div class="col-3"><label asp-for="stu.Age"></label></div>
            <div class="col-6"><input class="form-control" asp-for="stu.Age" /></div>
            <span asp-validation-for="stu.Age" class="text-danger"></span>
        </div>
        <div class="form-group row">
            <div class="col-3"><label asp-for="stu.PhoneNumber"></label></div>
            <div class="col-6"><input class="form-control" asp-for="stu.PhoneNumber" /></div>
            <span asp-validation-for="stu.PhoneNumber" class="text-danger"></span>
        </div>
        <div class="form-group row">
            <div class="col-3"><label asp-for="stu.StudentAddress"></label></div>
            <div class="col-6"><input class="form-control" asp-for="stu.StudentAddress" /></div>
            <span asp-validation-for="stu.StudentAddress" class="text-danger"></span>
        </div>
        <div class="form-group row">
            <div class="col-3"><label asp-for="stu.Class.ClassName"></label></div>
            <div class="col-6">
                <select class="custom-select" asp-for="stu.ClassId" asp-items="Model.Classlist">
                    <option value="">请选择班级</option>
                </select>
            </div>
            <span asp-validation-for="stu.Class.ClassName" class="text-danger"></span>
        </div>

        <div class="form-group row">
            <div class="col-3 offset-3 ">
                <input type="submit" class="btn btn-primary form-control" value="保存" />
            </div>
            <div class="col-3  ">
               @*跳转到列表页Index*@
                <a asp-page="Index" class="btn btn-success form-control">返回</a>
            </div>
        </div>
    </form>
</div>
